<app-header title="个人信息"></app-header>

<ion-content>
  <div class="mine" *ngIf="PersonalInfo">
    <div class="mylistinfo line pool_bg w96">
      <ul>
        <li (click)="changePhoto($event)">
          <input type="file" #avatarInput (change)="changefile($event)" accept="image/png, image/jpeg" style="display:none" />
          <p class="t-left">头像</p>
          <p class="t-right">
            <img class="imgtx" [src]="PersonalInfo.avater" alt="">
            <ion-icon name="chevron-forward-outline"></ion-icon></p>
        </li>
        <li (click)="showNk()">
          <p class="t-left">昵称</p>
          <p class="t-right">
            <span>{{PersonalInfo.nickname}}</span>
            <ion-icon name="chevron-forward-outline"></ion-icon>
          </p>
        </li>
        <li>
          <p class="t-left">账号</p>
          <p class="t-right">
            <span>{{PersonalInfo.phone.substr(0,3)}}****{{PersonalInfo.phone.substr(7)}}</span>
            <ion-icon name="chevron-forward-outline"></ion-icon>
          </p>
        </li>
      </ul>
    </div>

    <div class="mylistinfo pool_bg w96">
      <ul>
        <li [routerLink]="['/mine/idcenter']">
          <p class="t-left">实名认证</p>
          <p class="t-right">
            <span class="ci" *ngIf="PersonalInfo.personalStatus == 0">立即认证</span>
            <span class="ci" *ngIf="PersonalInfo.personalStatus == 1">查看认证</span>
            <ion-icon name="chevron-forward-outline"></ion-icon>
          </p>
        </li>
      </ul>
    </div>

    <!-- 修改昵称 -->
    <div class="updateNickname" *ngIf="disNk" >
      <div class="include">
        <h3>修改昵称</h3>
        <input type="text" placeholder="请输入昵称" [(ngModel)]="nickname">
        <div>
          <button (click)="cancelNk()">取消</button>
          <button (click)="commitNk()">确认</button>
        </div>
      </div>
    </div>

  </div>

  <app-lodding [falg]='show'></app-lodding>
</ion-content>
